package com.base.db.mysql

import com.base.model.api.UserModel_Service

//获取用户_用户名密码方式
fun MySQLService.service_getUserByAccount(loginname: String, password: String): String? {
    if (loginname.isBlank() || password.isBlank()) return null
    return mapper.service_getUserByAccount(loginname, password)?.firstOrNull()?.get("id")?.toString()
}

//获取用户登录信息
fun MySQLService.service_getUserInfoByUID(uid: String): UserModel_Service? {
    if (uid.isBlank()) return null
    return mapper.service_getUserInfoByUID(uid)?.firstOrNull()
}